home *** CD-ROM | disk | FTP | other *** search
/ The Charlie Rose Science Series Anthology / The Charlie Rose Science Series Anthology (Pfizer, Inc.)(2008).iso / mac / Charlie Rose Science Series Anthology.app / Contents / Resources / movie.swf / scripts / __Packages / hbxFlashTrack2.as
Text File  |  2008-02-01  |  7KB  |  246 lines

  1. class hbxFlashTrack2
  2. {
  3.    var acct = "DM5407252GFR";
  4.    var gn = "pfe.pfizer.com";
  5.    var vpc = "HBX0100ft2";
  6.    var vjs = "HBX0252.1ft2";
  7.    function hbxFlashTrack2()
  8.    {
  9.       this.req = new LoadVars();
  10.       this.reqData = new LoadVars();
  11.       this.req.hb = this.acct;
  12.       this.req.hec = "-1";
  13.       this.req.n = "flash default";
  14.       this.req.vcon = "/";
  15.       this.req.vpc = this.vpc;
  16.       this.req.vjs = this.vjs;
  17.       this.req.cd = "1";
  18.       this.req.hv = "6";
  19.       this.req.ln = System.capabilities.language;
  20.       this.req.ss = System.capabilities.screenResolutionX + "*" + System.capabilities.screenResolutionY;
  21.       this.req.rf = this.hbGetJSVal("window.document.referrer","bookmark");
  22.       this.req.ja = this.hbGetJSVal("window.navigator.javaEnabled()?\'y\':\'n\'");
  23.       this.req.sc = this.hbGetJSVal("window.screen.colorDepth",this.hbGetJSVal("window.screen.pixelDepth"));
  24.       this.req.pu = this.hbGetJSVal("window.document.URL");
  25.    }
  26.    function hbSend()
  27.    {
  28.       this.req.hec = this.req.hec + 1;
  29.       this.reqData.hid = new Date().getTime();
  30.       for(var _loc2_ in this.req)
  31.       {
  32.          this.reqData[_loc2_] = this.req[_loc2_];
  33.       }
  34.       var _loc3_ = this.reqData.toString();
  35.       _loc3_ = _loc3_.split("%2E").join(".");
  36.       this.reqData.load("http://" + this.gn + "/HG?" + _loc3_);
  37.       this.reqData = new LoadVars();
  38.    }
  39.    function hbSet(varName, varValue)
  40.    {
  41.       if(this.req[varName] != "" && this.req[varName] != undefined && this.req[varName] != "undefined")
  42.       {
  43.          this.req[varName] = varValue;
  44.       }
  45.       else
  46.       {
  47.          this.reqData[varName] = varValue;
  48.       }
  49.    }
  50.    function hbSetAccount(varValue)
  51.    {
  52.       this.req.hb = varValue;
  53.    }
  54.    function hbSetGateway(varValue)
  55.    {
  56.       this.gn = varValue;
  57.    }
  58.    function hbSetCustomerId(varValue)
  59.    {
  60.       this.req.customerid = varValue;
  61.    }
  62.    function hbSetMulti(obj)
  63.    {
  64.       trace(">>> HB: SET MULTI: ");
  65.       for(var _loc4_ in obj)
  66.       {
  67.          if(this.req[_loc4_] != "")
  68.          {
  69.             this.req[_loc4_] = obj[_loc4_];
  70.          }
  71.          else
  72.          {
  73.             this.reqData[_loc4_] = obj[_loc4_];
  74.          }
  75.       }
  76.       for(var _loc3_ in this.req)
  77.       {
  78.          trace("   > " + _loc3_ + ": " + this.req[_loc3_]);
  79.       }
  80.    }
  81.    function hbPageView(pn, mlc)
  82.    {
  83.       trace(">>> HB: PAGE VIEW: pn: \"" + pn + ", mlc: \"" + mlc + "\"");
  84.       this.req.hec = -1;
  85.       this.hbSet("n",pn);
  86.       this.hbSet("vcon",mlc);
  87.       this.hbSend();
  88.    }
  89.    function hbExitLink(el)
  90.    {
  91.       this.hbSet("el",el);
  92.       this.hbSend();
  93.    }
  94.    function hbDownload(fn)
  95.    {
  96.       this.hbSet("fn",fn);
  97.       this.hbSend();
  98.    }
  99.    function hbVisitorSeg(seg)
  100.    {
  101.       this.hbSet("seg",seg);
  102.       this.hbSend();
  103.    }
  104.    function hbCampaign(cmp)
  105.    {
  106.       this.hbSet("cmp",cmp);
  107.       this.hbSend();
  108.    }
  109.    function hbFunnel(fnl)
  110.    {
  111.       this.hbSet("fnl",fnl);
  112.       this.hbSend();
  113.    }
  114.    function hbGoalPage(gp)
  115.    {
  116.       this.hbSet("gp",gp);
  117.       this.hbSend();
  118.    }
  119.    function hbLink(lid, lpos)
  120.    {
  121.       this.hbSet("lid",lid);
  122.       if(lpos != undefined)
  123.       {
  124.          this.hbSet("lpos",lpos);
  125.       }
  126.       this.hbSend();
  127.    }
  128.    function hbForm(formState, focusField)
  129.    {
  130.       if(formState == 0)
  131.       {
  132.          this.hbSet("lf",focusField);
  133.       }
  134.       else
  135.       {
  136.          this.hbSet("sf",1);
  137.       }
  138.       this.hbSend();
  139.    }
  140.    function hbMediaEvent(mName, mCurPos, mEndPos, mState, mClient, mVersion)
  141.    {
  142.       var _loc2_ = new Object();
  143.       _loc2_["m.f"] = mName;
  144.       _loc2_["m.cp"] = mCurPos;
  145.       _loc2_["m.ep"] = mEndPos;
  146.       _loc2_["m.s"] = mState;
  147.       _loc2_["m.cl"] = mClient;
  148.       _loc2_["m.cv"] = mVersion;
  149.       this.hbSetMulti(_loc2_);
  150.       this.hbSend();
  151.    }
  152.    function hbGetJSVal(val, dval)
  153.    {
  154.       dval = dval == "null" ? "" : dval;
  155.       var _loc1_ = String(flash.external.ExternalInterface.call("eval",val));
  156.       if(_loc1_ != undefined && _loc1_ != "null")
  157.       {
  158.          return _loc1_;
  159.       }
  160.       return dval;
  161.    }
  162.    function hbProductView(mCacct, mTz, mPr, mBd, mCa, mPn, mMlc)
  163.    {
  164.       var _loc2_ = new Object();
  165.       _loc2_.epg = "n";
  166.       _loc2_.pv = "1";
  167.       _loc2_.aid = mCacct;
  168.       _loc2_.tz = mTz;
  169.       _loc2_.product = mPr;
  170.       _loc2_.brand = mBd;
  171.       _loc2_.category = mCa;
  172.       this.hbSetMulti(_loc2_);
  173.       this.hbPageView(mPn,mMlc);
  174.    }
  175.    function hbAddCart(mCacct, mTz, mPr, mQn, mBd, mCa, mPc, mSr, mPn, mMlc)
  176.    {
  177.       var _loc2_ = new Object();
  178.       _loc2_.epg = "n";
  179.       _loc2_.cam = "0";
  180.       _loc2_.pv = "0";
  181.       _loc2_.abd_type = "cart_add";
  182.       _loc2_.aid = mCacct;
  183.       _loc2_.tz = mTz;
  184.       _loc2_.product = mPr;
  185.       _loc2_.quantity = mQn;
  186.       _loc2_.brand = mBd;
  187.       _loc2_.category = mCa;
  188.       _loc2_.price = mPc;
  189.       _loc2_.store = mSr;
  190.       this.hbSetMulti(_loc2_);
  191.       this.hbPageView(mPn,mMlc);
  192.    }
  193.    function hbCheckOut(mCacct, mTz, mPr, mQn, mBd, mCa, mPc, mSr, mSt, mSh, mCp, mPn, mMlc)
  194.    {
  195.       var _loc2_ = new Object();
  196.       _loc2_.abd_type = "checkout";
  197.       _loc2_.aid = mCacct;
  198.       _loc2_.tz = mTz;
  199.       _loc2_.product = mPr;
  200.       _loc2_.quantity = mQn;
  201.       _loc2_.brand = mBd;
  202.       _loc2_.category = mCa;
  203.       _loc2_.price = mPc;
  204.       _loc2_.store = mSr;
  205.       _loc2_.shippingtype = mSt;
  206.       _loc2_.shipping = mSh;
  207.       _loc2_.cp = mCp;
  208.       this.hbSetMulti(_loc2_);
  209.       mPn;
  210.       this.hbPageView[mMlc];
  211.    }
  212.    function hbOrderConfirmation(mCacct, mTz, mPr, mQn, mBr, mCa, mSt, mSh, mPc, mSr, mCp, mOi, mCi, mSc, mSs, mSz, mSco, mPt, mSku, mCu, mDs, mPo, mC1, mC2, mPn, mMlc)
  213.    {
  214.       var _loc2_ = new Object();
  215.       _loc2_.abd_type = "order";
  216.       _loc2_.event = "true";
  217.       _loc2_.eid = "1";
  218.       _loc2_.aid = mCacct;
  219.       _loc2_.tz = mTz;
  220.       _loc2_.product = mPr;
  221.       _loc2_.quantity = mQn;
  222.       _loc2_.brand = mBr;
  223.       _loc2_.category = mCa;
  224.       _loc2_.shippingtype = mSt;
  225.       _loc2_.shipping = mSh;
  226.       _loc2_.price = mPc;
  227.       _loc2_.store = mSr;
  228.       _loc2_.cp = mCp;
  229.       _loc2_.orderid = mOi;
  230.       _loc2_.customerid = mCi;
  231.       _loc2_.shipcity = mSc;
  232.       _loc2_.shipstate = mSs;
  233.       _loc2_.shipzipcode = mSz;
  234.       _loc2_.shipcountry = mSco;
  235.       _loc2_.paymenttype = mPt;
  236.       _loc2_.sku = mSku;
  237.       _loc2_.customer_type = mCu;
  238.       _loc2_.discount = mDs;
  239.       _loc2_.promotion = mPo;
  240.       _loc2_.li_custom1 = mC1;
  241.       _loc2_.li_custom2 = mC2;
  242.       this.hbSetMulti(_loc2_);
  243.       this.hbPageView(mPn,mMlc);
  244.    }
  245. }
  246.